# -*- coding:utf-8 -*-
import sys

class Solution(object):
    def reverse(self, x):
        """
        :type x: int
        :rtype: int
        """
        x_str = str(x)
        result_str = ""
        if x_str.startswith("-"):
            result_str+="-"
            x_str = x_str[1:]
        x_str = x_str[::-1]
        result = int(result_str+x_str)

        if result>2147483647 or result<-2147483648:
            return  0
        return result
        
if __name__ == "__main__" :
    print Solution().reverse(1534236469);